package com.sg.plmadapter.adapters;

import java.util.List;

import com.mobnut.db.model.PrimaryObject;
import com.sg.plmadapter.windchill.PMWebservice;

public class RelativeObject extends WindchillSyncJob {

	private String toType;
	private boolean bSeachType;
	private String fromType;
	private List<String> queryWCObjectByPM;

	public List<String> getQueryWCObjectByPM() {
		return queryWCObjectByPM;
	}

	public void setQueryWCObjectByPM(List<String> queryWCObjectByPM) {
		this.queryWCObjectByPM = queryWCObjectByPM;
	}

	public RelativeObject(PMWebservice windchill, PrimaryObject po,
			String fromType, String toType, boolean bSeachType) {
		super(windchill, po);
		this.toType = toType;
		this.bSeachType = bSeachType;
		this.fromType = fromType;
	}

	@Override
	protected void run(PMWebservice windchill, PrimaryObject po)
			throws Exception {
		// windchill.relativeObject(po.get_id().toString(), formType, toType,
		// bSeachType);
		this.queryWCObjectByPM = windchill.queryWCObjectByPM(po.get_id()
				.toString(), fromType, toType, bSeachType);

	}

	@Override
	protected String getRequestCode() {
		return "";
	}

	@Override
	protected boolean canReload(PrimaryObject po) {
		return false;
	}

}
